package com.changgou.goods.feign;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Sku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "goods")//指定操作的是goods服务
@RequestMapping("/sku")
public interface SkuFeign {

    @GetMapping("/spu/{spuId}")//别忘了路径前要追加
     List<Sku> findByspuId(@PathVariable("spuId")String spuId);

}
